from __future__ import print_function
import time
import config
import ora_db3

if __name__ == '__main__':
    count = 0
    t = config.process_data_start_t
    while True and count < config.loop_count_ceiling:
        with open(config.process_t_log, 'w') as p_t_log:
            t1 = time.time()
            ora_db3.process_data_with_window(t, config.window_size, config.r_t_delta, config.v_t_delta, config.freq_threshold)
            t2 = time.time()
            t += config.t_step
            print(t, file=p_t_log)
            print(t2 - t1)
            count += 1
            print(count)
        # time.sleep(config.sleep_time)
